package com.lhy.controller;

import com.lhy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class UserController {
    @Autowired
    UserService userService;

    @GetMapping("/indexs")
    public String toIndex(Model model){
        System.out.println("阿斯顿发送到发多少");
        model.addAttribute("userList", userService.getAll());
        return "index";
    }
}
